package com.tjp.common.exception;

/**
 * 错误编码和错误信息的枚举类
 */
public enum BizCodeEnum {

    UNKNOW_EXCEPTION(10000, "系统未知错误"),
    VALID_EXCEPTION(10001, "参数格式错误"),
    VALID_SMS_EXCEPTION(10002, "验证码间隔不足60秒"),
    USERNAME_EXSIT_EXCEPTION(15001, "用户名已存在"),
    PHONE_EXSIT_EXCEPTION(15002, "手机号已存在");


    private int code;
    private String msg;

    BizCodeEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
